home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Modules
/
BackSpaceModules
/
Source
/
BoinkSpace
/
BoinkViewPart.h
< prev
next >
Wrap
Text File
|
1992-04-02
|
1KB
|
78 lines
#import <appkit/View.h>
#import "Thinker.h"
typedef struct { float l,b,r,t; } BRECT;
typedef struct {
float hue;
float pos;
} LineInfo;
// maximum number number of grid lines
#define NVERT 8
#define NHORIZ 10
#define DECREASING 0
#define INCREASING 1
void horizLineWithAvoidance(float x1, float y1, float x2,float y2,
float hue,float brightness, const NXRect *r);
void verticalLineWithAvoidance(float x1, float y1, float x2,float y2,
float hue,float brightness, const NXRect *r);
@interface BoinkView:View
{
float xpos;
float xspeed;
float ypos;
float yspeed;
float accel;
int ballNum;
int spinDir;
int rebound;
float viewHeight;
float viewWidth;
BRECT old;
NXPoint ballTo;
NXPoint redrawTo;
NXRect redraw;
NXSize oldSize;
id buffer;
id balls;
int nvert, nhoriz;
int vcount, hcount;
LineInfo vertLines[NVERT];
LineInfo horizLines[NHORIZ];
int toggle;
int reboundMode;
float lastLaunchSpeed;
BStimeval now, then;
BStimeval nextRotationTime;
BStimeval nextLineDrawTime;
}
- oneStep;
- newSpeed;
- initFrame:(const NXRect *)frameRect;
- setAccel:(float)val;
- sizeTo:(NXCoord)width :(NXCoord)height;
- drawSelf:(const NXRect *)rects :(int)rectCount;
- newViewSize;
- incrementBallNumber;
- (float) getRandomXspeed;
- (float) timeCorrectedXSpeed;
- checkXspeed:(float *)speed;
- (const char *)windowTitle;
- updateGrid;
- drawGrid;
- drawLinesInBuffer;
@end